<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
</head>
<body>
    <div id="box">正在测试localstorage</div>
</body>
<script>

    // console.log(localStorage.getItem("name"))

    // localStorage.setItem("name","lisi")

    // localStorage.removeItem("name")

    // localStorage.setItem("obj",{name:"admin"})
    localStorage.setItem("obj",JSON.stringify({name:"admin"}))

    console.log(JSON.parse(localStorage.getItem("obj")))

</script>
</html>